Re: [GENERAL] Problem with a GROUP BY clause - Mailing list pgsql-general

From Herouth Maoz
Subject Re: [GENERAL] Problem with a GROUP BY clause
Date
Msg-id l03130304b3ca0b616eeb@[147.233.159.109]
Whole thread Raw
In response to Problem with a GROUP BY clause  (Mark Dalphin <mdalphin@amgen.com>)
List pgsql-general
At 03:52 +0300 on 01/08/1999, Mark Dalphin wrote:


> There is no row, yet Postgresql reports there is "one" which it returns as
> empty.  This also makes the Perl DBI::DBD interface unhappy. It seems to
>return
> an undefined value which can't even be tested with "if(! defined $value)"!
>
> Unless I really misunderstand "GROUP BY", I think this is a bug.

We had this discussion in the past and I think you are right in saying that
under "GROUP BY", this behaviour is a bug. However, it is not really that
hard to handle. It merely returns a row with NULL values all over. Test for
NULL in the same way you test for NULL in any field that may have NULL
values. You can be sure that if a valid grouping was returned, neither
field will be null.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma



pgsql-general by date:

Previous
From: Herouth Maoz
Date:
Subject: Re: [GENERAL] Search
Next
From: Dmitry Morozovsky
Date:
Subject: read-only databases